package main;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.game.Sprite;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author WIN7
 */
public class Item {
    protected Sprite sprite;
    protected String name;
    protected int xLocation;
    protected int yLocation;
    protected Item[] neighborItems = new Item[4];
    public Item(String _name)
    {
        name = _name;
    }
    
    public void setNeighborItems(Item[] itemList)
    {
        for(int i=0; i<4; i++)
        {
            neighborItems[i] = itemList[i];
        }
    }
    
    public Item getWesternItem()
    {
        return neighborItems[0];
    }
    public Item getNorthernItem()
    {
        return neighborItems[1];
    }
    public Item getEasternItem()
    {
        return neighborItems[2];
    }
    public Item getSouthernItem()
    {
        return neighborItems[3];
    }
    
    public Item[] getNeighborItems()
    {
        return neighborItems;
    }
    
    public Sprite getSprite()
    {
        return sprite;
    }
    
    public int getX()
    {
        return xLocation;
    }
    
    public int getY()
    {
        return yLocation;
    }
    
    public String getName()
    {
        return name;
    }
    
    
    public void drawInfo(Graphics g)
    {
        //g.setColor(200, 0, 0);
        g.drawString(name, xLocation, yLocation, Graphics.BASELINE|Graphics.LEFT);
    }
}